package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BloodDrawRecordsMapper;
import com.ruoyi.system.domain.BloodDrawRecords;
import com.ruoyi.system.service.IBloodDrawRecordsService;

/**
 * 采血信息记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-08
 */
@Service
public class BloodDrawRecordsServiceImpl implements IBloodDrawRecordsService 
{
    @Autowired
    private BloodDrawRecordsMapper bloodDrawRecordsMapper;

    /**
     * 查询采血信息记录
     * 
     * @param id 采血信息记录主键
     * @return 采血信息记录
     */
    @Override
    public BloodDrawRecords selectBloodDrawRecordsById(Long id)
    {
        return bloodDrawRecordsMapper.selectBloodDrawRecordsById(id);
    }

    /**
     * 查询采血信息记录列表
     * 
     * @param bloodDrawRecords 采血信息记录
     * @return 采血信息记录
     */
    @Override
    public List<BloodDrawRecords> selectBloodDrawRecordsList(BloodDrawRecords bloodDrawRecords)
    {
        return bloodDrawRecordsMapper.selectBloodDrawRecordsList(bloodDrawRecords);
    }

    /**
     * 新增采血信息记录
     * 
     * @param bloodDrawRecords 采血信息记录
     * @return 结果
     */
    @Override
    public int insertBloodDrawRecords(BloodDrawRecords bloodDrawRecords)
    {
        bloodDrawRecords.setCreateTime(DateUtils.getNowDate());
        return bloodDrawRecordsMapper.insertBloodDrawRecords(bloodDrawRecords);
    }

    /**
     * 修改采血信息记录
     * 
     * @param bloodDrawRecords 采血信息记录
     * @return 结果
     */
    @Override
    public int updateBloodDrawRecords(BloodDrawRecords bloodDrawRecords)
    {
        bloodDrawRecords.setUpdateTime(DateUtils.getNowDate());
        return bloodDrawRecordsMapper.updateBloodDrawRecords(bloodDrawRecords);
    }

    /**
     * 批量删除采血信息记录
     * 
     * @param ids 需要删除的采血信息记录主键
     * @return 结果
     */
    @Override
    public int deleteBloodDrawRecordsByIds(Long[] ids)
    {
        return bloodDrawRecordsMapper.deleteBloodDrawRecordsByIds(ids);
    }

    /**
     * 删除采血信息记录信息
     * 
     * @param id 采血信息记录主键
     * @return 结果
     */
    @Override
    public int deleteBloodDrawRecordsById(Long id)
    {
        return bloodDrawRecordsMapper.deleteBloodDrawRecordsById(id);
    }
}
